block variables

doctype html
html
    head
        meta(charset='utf-8')
        meta(http-equiv='X-UA-Compatible', content='IE=edge')

        script(type='text/javascript').
            var hash = (location.hash || '').replace('#', '');
            var search = (location.search || '').replace('?', '');
            var lang = navigator.language || navigator.userLanguage;
            lang = lang.indexOf('zh') > -1 ? 'zh' : 'en';
            location.href = '#{host}/' + lang + '/#{redirectTo}'
                + (search ? '?' + search : '') + (hash ? '#' + hash : '');
